Skip to content

Migrate Users shared directives to v3 wrappers - #3901

Open
Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 17 commits into
powershell-v3from
ramsessanchez-users-v3-migration
Open

Ramses Sanchez-Hernandez (ramsessanchez) wants to merge 17 commits into
powershell-v3from
ramsessanchez-users-v3-migration

Conversation

@ramsessanchez

@ramsessanchez Ramses Sanchez-Hernandez (ramsessanchez) commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Related issue: N/A; this is the Users portion of the shared v3 directive migration.

Changes proposed in this pull request

  • Migrate only src/Users/Users.md for both v1.0 and beta, with no excluded profiles. All four directives remain active and have reviewed annotations/ledger evidence: three suppressions and one rename subsumed by the earlier root To Do suppression. The original case-sensitive selector matches exactly the same three surviving method/path/operation-ID triples in each actual legacy and current compatible spec. No false API-absence declarations or legacy bridge fields.
  • Preserve singleton photo names/URLs, ordinary List defaults and curated behavior. Keep the separately published UserSponsorDirectoryObjectByRef item command and the collection command's native mandatory QueryId/@id contract. Name the distinct media path with required ProfilePhotoId as UserPhotoContentById, rather than grouping incompatible media or deleting an endpoint. No generator/runtime/Auth/derived-data changes in this branch.
  • Preserve the original migration and per-profile generation history, normally integrate powershell-v3 target 6475f3f5beb4908d39ea356db32bf1e0fd3273cb, and regenerate Kiota clients, cmdlets, projects and lockfiles together in separate v1.0 and beta commits. PATCH204 now succeeds with one PATCH, no output and no implicit GET; PATCH200 returns its actual model in one PATCH. An explicit caller GET keeps its own headers, queries and errors.

Scope and limitations

All global directives and profile-local directive files, including Users local groups, are explicitly ignored and unchanged. Parameter aliases/transforms and schema/response directives are deferred; none occur in the shared source. Frozen v1.0 secondary-photo derived suppressions remain unchanged. The 2XX-only media PUT paths remain unsuppressed client-only baseline operations. No route selector, capability flag, profile-scoped authored rule, new mutation group or optional-query expansion is introduced.

Raw naming parity is reported without normalizing beta prefixes: v1.0 has 301/303 matches (one existing name mismatch and one missing oracle entry); beta remains Mg rather than MgBeta and has 0/321 raw matches. These are known naming/oracle limits, not a passing all-surface parity claim. Offline wire acceptance is not live-tenant certification. PowerShell 7/Core only; Desktop is unsupported. The existing Microsoft.OpenApi.YamlReader NU1903 warning is unchanged.

Validation (actual commands and outcomes)

dotnet test tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj --configuration Release --filter 'FullyQualifiedName~UsersDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --logger 'trx;LogFileName=targeted.trx' --results-directory C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-final --verbosity quiet — passed: 180 executed, 180 passed, 0 failed/skipped, recorded in the nonempty TRX.

pwsh -NoProfile -File tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module Users -FailOnUnresolved -OutputPath C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-final\strict-inventory.json — passed: all four Mapped.

Full generation/build commands, executed sequentially with the unchanged four-mutex queue:

pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-laughing-pancake -Module Users -ApiVersion v1.0 -Configuration Release
pwsh -NoProfile -NonInteractive -File C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1 -RepoRoot C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-laughing-pancake -Module Users -ApiVersion beta -Configuration Release
Profile Full pipeline result Compiled exports Seconds Combined generation commit
v1.0 exit0, OK 303 330.8 21d1c5850a8813546f78defda3f13817fce3ccd8
beta exit0, OK 321 172.4 6877b31bb21e68255c503d676e5d705e7367c0db

Both runs use isolated Kiota 1.36.1 with model parallelism 1, .NET 10.0.403 and the designated adapted Authentication 2.41.2 package (all 64 file hashes verified, physical nupkg SHA256 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB). No skips, legacy fallback, dependency preloads or injected DLLs. The latest client/lock bytes are unchanged; the full regenerations remove implicit GET code from 28 v1.0 and 30 beta cmdlet files. Original migration 02d1d18a96 and all earlier profile boundaries remain intact. Final authored correction: 9122523d7002aa56939851aba657c85235710c69.

Normal-manifest compiled metadata checks below retain their original valid results. Only the affected offline runtime/query/media/lifecycle probes were rerun with corrected in-memory setup against the same head and unchanged compiled modules; no production source, Authentication, FULL build, TRX or generation commit was changed.

$repo = 'C:\Users\ramsess\Repos\copilot-worktrees\msgraph-sdk-powershell\ramsessanchez-laughing-pancake'
$compiledProof = 'C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-final'
$proof = 'C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-memory-final'
pwsh -NoProfile -File "$compiledProof\Assert-UsersCompiled.ps1" -RepoRoot $repo -Profile v1.0 -Environment Global -OutputPath "$compiledProof\compiled-v1.0-Global.json" -RequireDeleteQuery
pwsh -NoProfile -File "$compiledProof\Assert-UsersCompiled.ps1" -RepoRoot $repo -Profile v1.0 -Environment USGov -OutputPath "$compiledProof\compiled-v1.0-USGov.json" -RequireDeleteQuery
pwsh -NoProfile -File "$compiledProof\Assert-UsersCompiled.ps1" -RepoRoot $repo -Profile beta -Environment Global -OutputPath "$compiledProof\compiled-beta-Global.json" -RequireDeleteQuery
pwsh -NoProfile -File "$compiledProof\Assert-UsersCompiled.ps1" -RepoRoot $repo -Profile beta -Environment USGov -OutputPath "$compiledProof\compiled-beta-USGov.json" -RequireDeleteQuery
pwsh -NoProfile -NonInteractive -File "$proof\Test-UsersRuntime.ps1" -RepoRoot $repo -Profile v1.0 -Environment Global
pwsh -NoProfile -NonInteractive -File "$proof\Test-UsersRuntime.ps1" -RepoRoot $repo -Profile v1.0 -Environment USGov
pwsh -NoProfile -NonInteractive -File "$proof\Test-UsersRuntime.ps1" -RepoRoot $repo -Profile beta -Environment Global
pwsh -NoProfile -NonInteractive -File "$proof\Test-UsersRuntime.ps1" -RepoRoot $repo -Profile beta -Environment USGov

All eight commands passed, exit0: four unchanged original compiled-metadata results and four newly corrected runtime processes. Normal Authentication import into the confirmation runspace resets the shared datastore to DiskDataStore; the revised probe reapplies the existing Set-MgTestDataStore helper after the last additional-runspace module import and before Connect/HTTP. Across the new runs, 322 reflected datastore assertions verify the actual type Microsoft.Graph.Authentication.Test.Mocks.MockDataStore, including both runspaces and checks before transport, request-context changes, reconnect and logout. The earlier raw proof and handoff remain unchanged as historical evidence with an insufficient post-import isolation guard; no historical credential I/O is inferred merely from the reported datastore type.

The four corrected profile/cloud runtime processes captured 110 offline HTTP requests, 26 genuine declined confirmations (one prompt and zero HTTP each), 26 genuine accepted confirmations (one prompt and one selected operation each), and 26 WhatIf cases with zero HTTP. Coverage includes five suppressed routes absent; 13 actual compiled neighbors; List defaults; mandatory QueryId and missing/null/empty rejection before HTTP; exact escaped full-reference URI on native @id; query-free item-reference neighbor; media bytes/OutFile and required PhotoId; actual typed GET/POST/action bodies/results; PATCH204/no-GET even when GET returns403; PATCH200/actual model; independent explicit GET; optional OData/nextLink/DeltaLink isolation; real Connect-MgGraph + guarded in-memory MockDataStore + GraphHttpClientFactory; unchanged factory BaseAddress; session/cache lifecycle and single Auth-owned dependency closure. The corrected runs make no live OAuth, Graph or credential-store calls.

pwsh -NoProfile -File tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath src\Users\wrapper\v1.0\Cmdlets -OutLedger C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-final\raw-parity-v1.0.csv and the same command using src\Users\wrapper\beta\Cmdlets and raw-parity-beta.csv — exit1 in both, known raw parity limitations above retained honestly.

Evidence is preserved outside the repository. The unchanged post3886-6475-final folder contains the original targeted.trx, full profile logs, strict inventory, compiled metadata, Auth64/source/spec hashes and historical runtime evidence. The new canonical handoff is C:\Users\ramsess\.copilot\session-state\3fd53743-7466-4387-afc7-c9c413a3db4a\files\post3886-6475-memory-final\handoff.json, with the corrected runtime script, four raw logs/results/HTTP captures and actual datastore stage/type assertions, original-artifact hashes, and before/after hashes proving unchanged compiled modules and all 64 Authentication files. No binaries, bin/obj, packages or logs are committed.

Other links

Preserve the complete root Todo selector match set, license-detail creation and photo update suppressions in both profiles. Record the unreachable List rename honestly, retain curated photo behavior, and pin compatible neighbors without reading profile-local directives.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full compatible-spec Release pipeline with Kiota 1.36.1 and official Authentication 2.38.1 completed OK with 303 compiled exports. Client and cmdlet sources and projects are byte-identical; the client lock records the tool upgrade. Existing parity limitations: 251/256 direct-call matches, 47 dispatchers, four missing oracle entries and one name mismatch. PUT photo content remains a pre-existing unsupported emission, not newly suppressed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve beta's sponsor reference collision with the exact published SponsorDirectoryObjectByRef noun from same-profile command metadata and Learn. Keep the root SponsorByRef route and pin both source contracts; record its existing required-query binding limitation instead of dropping either route.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record authoritative published singleton/default and item/alternate mandatory IDs for binary GET and DELETE photo content. Test both actual compatible routes and IDs without suppressing unique routes or falsely claiming a successful multi-route generation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin all four dispositions, every exact compatible successor, complete original Todo bridges and explicit non-absence. These module tests complement rather than substitute for the pending central strict reviewed-inventory gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use three-setting generation config with explicitly separate runtime profile. Reprove complete original Todo selector/current aligned triples and remove obsolete legacy schema. Preserve media endpoints with the source-backed ById noun instead of unsupported media groups; retain singleton defaults and frozen derived coverage. Required sponsor delete query remains gated on normal shared fix integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Final shared-source01e70c6197, compatible spec7cb83e0f6f59232ce7e7fd585001d3836c3938d2. Full queued Kiota1.36.1/cap1 plus cmdlet Release pipeline succeeded exit0,StatusOK,303exports in50.7seconds with original official Authentication2.38.1. Combined client/cmdlet/projects/locks regeneration; unchanged cmdlet/project bytes are not fabricated deltas.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
First complete tracked beta output: compatible spec71a3ce7e835abfecb84bad4776a22e5a6814531c, shared-source01e70c6197. Full sequential queued Kiota1.36.1/cap1 and cmdlet Release pipeline succeeded exit0,StatusOK,321compiled exports in52.5seconds using complete original official Authentication2.38.1. Client, cmdlets, both projects and lockfiles committed together; no bin/obj/logs/binaries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pin the complete effective required-query set to the surviving sponsor collection DELETE in both specs, mandatory QueryId with no old Id alias and typed Kiota Id assignment; item-reference neighbor stays query-free. Refresh audit target to merged3882 without module flags or global fixes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota1.36.1 cap1 plus Release cmdlet pipeline succeeded exit0,StatusOK,303exports74.5seconds on4eb3ca3 from final own source6d6c22ef79. Adapted Authentication2.41.2 complete64hash package verified. Combined client/cmdlet/project/lock regeneration, native mandatoryQueryId and3ownedDLL packaging; no hand edits or dependency injection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sequential full queued Kiota1.36.1 cap1 plus Release cmdlet pipeline succeeded exit0,StatusOK,321exports136.7seconds at normal4eb3ca3 from final own source6d6c22ef79. Original designated adaptedAuth2.41.2 all64hashes/package verified. Combined client/cmdlet/projects/locks generation boundary; no framework overlays or hand-generated edits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update shared audit to6475 and verify Update User emits only PATCH, returns actual non-null model and introduces no GET or GET-only query requirement. Preserve shared selectors, requiredQueryId and media/default/frozen surfaces; historical readback failure evidence remains unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota1.36.1 cap1 client+cmdlet Release pipeline at normal6475 target/finalsource9122523d70 succeeded exit0,OK303exports330.8seconds with verified64file adaptedAuth2.41.2. Combined client/cmdlet/projects/locks boundary; byte-identical client/lock outputs not fabricated, generatedPATCHreadback removed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sequential full queued Kiota1.36.1 cap1 client+cmdlet Release pipeline at normal6475/final authoredsource9122523d70 succeeded exit0,OK321exports172.4seconds with verified adaptedAuth2.41.2/64hashes. Combined client/cmdlet/projects/locks boundary; byte-identical client and lock files preserved honestly, generated implicitGET removed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant